#ifndef SUBSCRIBERLISTENER_H
#define SUBSCRIBERLISTENER_H

#include "vhpubsub/vhpubsub.h"
#include "StdAfx.h"
#include "cpptcl.h"

using namespace std;

class SubscriberListener : public vhpubsub::MessageListener, public vhpubsub::SessionListener
{
public:
    SubscriberListener();
    virtual void OnMessage(vhpubsub::Session* session, const vhpubsub::Message* msg);
    virtual void OnSessionEvent(vhpubsub::Session* session, const vhpubsub::SessionEvent* event);
    std::string getData();
    void setDebugMode(const bool &debug);
    virtual ~SubscriberListener(void);


private:
    bool                    _debug;
    std::string             _data;
    bool                    _dataWritingFlag;
};

#endif //SUBSCRIBERLISTENER_H